package zookeeper.rmi.server;


import zookeeper.rmi.service.HelloServiceImpl;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

/**
 * Created by majian8 on 2018/6/12.
 * @refference   http://www.tianshouzhi.com/api/tutorials/zookeeper/219
 */
public class RmiServer {
    public static void main(String[] args) throws Exception {
        int port=1100;
        String url="rmi://localhost:1100/helloService";
        LocateRegistry.createRegistry(port);
        Naming.rebind(url,new HelloServiceImpl());
    }
}
